/*
 * Copyright (c) 2015 www.smarthome.com All rights reserved.
 * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
 */
package com.smarthome.base.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.smarthome.base.dao.ShServiceDao;
import com.smarthome.base.dao.base.BaseDaoImpl;
import com.smarthome.domain.bean.ShService;

/**
 * ShServiceDao 实现类
 * @author KongXiangyu
 * @since 2015-09-07
 */
@Repository("shServiceDao")
public class ShServiceDaoImpl extends BaseDaoImpl<ShService,Long> implements ShServiceDao {
	private final static String NAMESPACE = "com.smarthome.base.dao.ShServiceDao.";
	
	//返回本DAO命名空间,并添加statement
	public String getNameSpace(String statement) {
		return NAMESPACE + statement;
	}


	@Override
	public Map<String,Object> queryServiceAndFeedbackCount(ShService queryShService) {
		return this.selectMap(getNameSpace("queryServiceAndFeedbackCount"), queryShService, "name");
	}

	@Override
	public Map<String,Object> queryServiceTypeCount(ShService queryShService) {
		return this.selectMap(getNameSpace("queryServiceTypeCount"), queryShService, "name");
	}

	@Override
	public List<ShService> selectShServices(ShService service) {
		return this.selectList(getNameSpace("selectShServices"), service);
	}


	@Override
	public List<ShService> queryShServices(ShService service) {
		return this.selectList(getNameSpace("queryShServices"), service);
	}


	@Override
	public Long queryServiceCount(ShService queryShService) {
		return this.select(getNameSpace("queryServiceCount"), queryShService);
	}
		
}